package config;

public class Url {
	private static final String hostToTest = "http://192.168.1.35:8000/";
	//private static final String hostToTest2 = "http://192.168.137.1:8000/";
	private static final String hostToDeploy = "http://truongnha.com/";

	private static final String LOGIN = "api/login/";
	private static final String LOGOUT = "api/logout/";
	private static final String ATTENDANCE_FOR_STUDENT_ALL_TERM = "api/getAttendanceForStudent/allTerm";
	private static final String ATTENDANCE_FOR_STUDENT_ALL_YEAR = "api/getAttendanceForStudent/allYear";
	private static final String MARK_FOR_STUDENT = "api/markForAStudent/";
	private static final String ATTENDANCE_FOR_TEACHER = "api/attendance/";

	public static String getHost() {
		if (Setting.isTest) {
			return hostToTest;
		} else {
			return hostToDeploy;
		}
	}

	public static String getURLLogin() {
		return getHost() + LOGIN;
	}

	public static String getURLLogout() {
		return getHost() + LOGOUT;
	}

	public static String getURLGetAttendanceForStudentAllYear() {
		return getHost() + ATTENDANCE_FOR_STUDENT_ALL_YEAR;
	}

	public static String getURLGetAttendanceForStudentAllTerm() {
		return getHost() + ATTENDANCE_FOR_STUDENT_ALL_TERM;
	}

	public static String getURLGetMarkForStudent() {
		return getHost() + MARK_FOR_STUDENT;
	}

	public static String getURLGetAttendanceTeacher() {
		return getHost() + ATTENDANCE_FOR_TEACHER;
	}

	public static String getURLPostAttendanceTeacher() {
		return getHost() + ATTENDANCE_FOR_TEACHER;
	}
}
